package com.fastCms.customer;

import com.github.xiaoymin.knife4j.spring.annotations.EnableKnife4j;
import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.transaction.annotation.EnableTransactionManagement;

import java.util.TimeZone;

@Slf4j
@EnableTransactionManagement
@ServletComponentScan
@SpringBootApplication(scanBasePackages = {"com.fastCms"})
@MapperScan(basePackages = "com.fastCms")
@EnableKnife4j
public class CustomerApplication extends SpringBootServletInitializer {
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(CustomerApplication.class);
    }

    public static void main(String[] args) {
        Long time = System.currentTimeMillis();
        TimeZone.setDefault(TimeZone.getTimeZone("Asia/Shanghai"));
        SpringApplication.run(CustomerApplication.class, args);
        log.error("客户端 Customer 项目启动成功 用时：{} ms", System.currentTimeMillis() - time);
    }

}
